home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / hf^k-2.dms / in.adf / MUIClass.Lha / Include / Classes / TWiMUI / Popobject.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-06  |  4.1 KB  |  132 lines

  1. //
  2. //  $VER: Popobject.h   1.2 (02 Sep 1996)
  3. //
  4. //    c 1996 Thomas Wilhelmi
  5. //
  6. //
  7. // Address : Taunusstrasse 14
  8. //           61138 Niederdorfelden
  9. //           Germany
  10. //
  11. //  E-Mail : willi@twi.rhein-main.de
  12. //
  13. //   Phone : +49 (0)6101 531060
  14. //   Fax   : +49 (0)6101 531061
  15. //
  16. //
  17. //  $HISTORY:
  18. //
  19. //  16 Jun 1996 :   1.0 : first public Release
  20. //
  21. //  02 Sep 1996 :   1.2 : Neu:
  22. //                        - ClassNum() für Exception-Handling.
  23. //                        Änderungen
  24. //                        - Parameter des Copy-Konstruktor als 'const'-Parameter definiert
  25. //
  26.  
  27. #ifndef CPP_TWIMUI_POPOBJECT_H
  28. #define CPP_TWIMUI_POPOBJECT_H
  29.  
  30. #ifndef CPP_TWIMUI_POPSTRING_H
  31. #include <classes/twimui/popstring.h>
  32. #endif
  33.  
  34. #ifndef UTILITY_HOOKS_H
  35. #include <utility/hooks.h>
  36. #endif
  37.  
  38. class MUIPopobjectObjStrHook
  39.     {
  40.     private:
  41.         struct Hook objstrhook;
  42.         static void ObjStrHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 Object *);
  43.         virtual void ObjStrHookFunc(struct Hook *, Object *, Object *);
  44.     protected:
  45.         MUIPopobjectObjStrHook();
  46.         MUIPopobjectObjStrHook(const MUIPopobjectObjStrHook &p);
  47.         ~MUIPopobjectObjStrHook();
  48.         MUIPopobjectObjStrHook &operator= (const MUIPopobjectObjStrHook &);
  49.     public:
  50.         struct Hook *objstr() { return(&objstrhook); };
  51.     };
  52.  
  53. class MUIPopobjectStrObjHook
  54.     {
  55.     private:
  56.         struct Hook strobjhook;
  57.         static BOOL StrObjHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 Object *);
  58.         virtual BOOL StrObjHookFunc(struct Hook *, Object *, Object *);
  59.     protected:
  60.         MUIPopobjectStrObjHook();
  61.         MUIPopobjectStrObjHook(const MUIPopobjectStrObjHook &p);
  62.         ~MUIPopobjectStrObjHook();
  63.         MUIPopobjectStrObjHook &operator= (const MUIPopobjectStrObjHook &);
  64.     public:
  65.         struct Hook *strobj() { return(&strobjhook); };
  66.     };
  67.  
  68. class MUIPopobjectWindowHook
  69.     {
  70.     private:
  71.         struct Hook windowhook;
  72.         static void WindowHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 Object *);
  73.         virtual void WindowHookFunc(struct Hook *, Object *, Object *);
  74.     protected:
  75.         MUIPopobjectWindowHook();
  76.         MUIPopobjectWindowHook(const MUIPopobjectWindowHook &p);
  77.         ~MUIPopobjectWindowHook();
  78.         MUIPopobjectWindowHook &operator= (const MUIPopobjectWindowHook &);
  79.     public:
  80.         struct Hook *window() { return(&windowhook); };
  81.     };
  82.  
  83. class MUIPopobject
  84.     :   public MUIPopstring,
  85.         public MUIPopobjectObjStrHook,
  86.         public MUIPopobjectStrObjHook,
  87.         public MUIPopobjectWindowHook
  88.     {
  89.     protected:
  90.         virtual const ULONG ClassNum() const;
  91.         MUIPopobject(STRPTR cl)
  92.             :   MUIPopstring(cl),
  93.                 MUIPopobjectObjStrHook(),
  94.                 MUIPopobjectStrObjHook(),
  95.                 MUIPopobjectWindowHook()
  96.             { };
  97.     public:
  98.         MUIPopobject(const struct TagItem *t)
  99.             :   MUIPopstring(MUIC_Popobject),
  100.                 MUIPopobjectObjStrHook(),
  101.                 MUIPopobjectStrObjHook(),
  102.                 MUIPopobjectWindowHook()
  103.             {
  104.             init(t);
  105.             };
  106.         MUIPopobject(const Tag, ...);
  107.         MUIPopobject()
  108.             :   MUIPopstring(MUIC_Popobject),
  109.                 MUIPopobjectObjStrHook(),
  110.                 MUIPopobjectStrObjHook(),
  111.                 MUIPopobjectWindowHook()
  112.             { };
  113.         MUIPopobject(const MUIPopobject &);
  114.         virtual ~MUIPopobject();
  115.         MUIPopobject &operator= (const MUIPopobject &);
  116.         void Follow(const BOOL p) { set(MUIA_Popobject_Follow,(ULONG)p); };
  117.         BOOL Follow() const { return((BOOL)get(MUIA_Popobject_Follow,FALSE)); };
  118.         void Light(const BOOL p) { set(MUIA_Popobject_Light,(ULONG)p); };
  119.         BOOL Light() const { return((BOOL)get(MUIA_Popobject_Light,TRUE)); };
  120.         Object *ObjectP() const { return((Object *)get(MUIA_Popobject_Object,NULL)); };
  121.         void ObjStrHook(const struct Hook *p) { set(MUIA_Popobject_ObjStrHook,(ULONG)p); };
  122.         struct Hook *ObjStrHook() const { return((struct Hook *)get(MUIA_Popobject_ObjStrHook,TRUE)); };
  123.         void StrObjHook(const struct Hook *p) { set(MUIA_Popobject_StrObjHook,(ULONG)p); };
  124.         struct Hook *StrObjHook() const { return((struct Hook *)get(MUIA_Popobject_StrObjHook,TRUE)); };
  125.         void Volatile(const BOOL p) { set(MUIA_Popobject_Volatile,(ULONG)p); };
  126.         BOOL Volatile() const { return((BOOL)get(MUIA_Popobject_Volatile,TRUE)); };
  127.         void WindowHook(const struct Hook *p) { set(MUIA_Popobject_WindowHook,(ULONG)p); };
  128.         struct Hook *WindowHook() const { return((struct Hook *)get(MUIA_Popobject_WindowHook,TRUE)); };
  129.     };
  130.  
  131. #endif
  132.